package cn.hd.dao;

import cn.hd.entity.AuthRealName;
import cn.hd.entity.Reallyname;
import cn.hd.entity.User;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface ReallynameDao {

    //增加
    public int addReallyname(Reallyname reallyname);
    //按id搜索
    //根据用户编号查询该用户实名认证审核状态
    public Reallyname selectByUserIdRealname(long userid);

    //用户审核表
    //通过审核
    public int passAuthRealName(long authrealid);
    //不通过审核
    public int failAuthRealName(long authrealid);
    //查询所有
    public List<AuthRealName> selectAuthRealName(Map map);
    //按id搜索
    public AuthRealName selectByIdAuthRealName(long authrealid);
    //修改角色
    public int updaterole(long id);

    //根据真是i姓名查询id
    public Reallyname selectByUname(String uname);

    //查询实名认证表里添加的最后一条信息
    public Reallyname selectzxreal();

    //把刚实名认证的用户加入到实名认证审核表中
    public int addShreal(AuthRealName authRealName);

    //删除
    public int deleteAuthreals(long authrealid);

    //根据真实姓名删除实名认证审核表中的数据
    public int deleteRealByRealname(String realname);

    //根据id查询
    public AuthRealName selectAuthrealByAid(long authrealid);

    //根据真实姓名查询实名认证审核表的数据
    public AuthRealName selectAuthRealByrealname(String realname);

    //根据真实姓名修改失败的审核状态
    public int updateRealStatus(String realname);

    //根据用户编号删除实名认证表中的信息
    public int deleteRealByUserid(long userid);
}
